import request from '@/utils/request'

// 查询往来信息列表
export function listCommunication(query) {
  return request({
    url: '/communication/communication/list',
    method: 'get',
    params: query
  })
}

// 查询往来信息详细
export function getCommunication(id) {
  return request({
    url: '/communication/communication/' + id,
    method: 'get'
  })
}

// 新增往来信息
export function addCommunication(data) {
  return request({
    url: '/communication/communication',
    method: 'post',
    data: data
  })
}

// 修改往来信息
export function updateCommunication(data) {
  return request({
    url: '/communication/communication',
    method: 'put',
    data: data
  })
}

// 删除往来信息
export function delCommunication(id) {
  return request({
    url: '/communication/communication/' + id,
    method: 'delete'
  })
}

// 确认往来信息
export function confirmCommunication(id) {
  return request({
    url: '/communication/communication/confirm/' + id,
    method: 'get'
  })
}
